//
//  OrderTimeCell.m
//  carowner
//
//  Created by apple on 2019/5/23.
//  Copyright © 2019 ggj. All rights reserved.
//

#import "OrderTimeCell.h"

@implementation OrderTimeCell


-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
        _tvTime = [[UILabel alloc] init];
        _tvTime.font = textFont;
        _tvTime.textColor = [UIColor whiteColor];
        
        _tvNum = [[UILabel alloc] init];
        _tvNum.backgroundColor = [UIColor whiteColor];
        _tvNum.layer.cornerRadius = 6;
        _tvNum.clipsToBounds = YES;
        _tvNum.textColor = color1;
        _tvNum.font = textFont;
        _tvNum.textAlignment = NSTextAlignmentCenter;
        
        UIView * space = [[UIView alloc]init];
        space.backgroundColor = [UIColor whiteColor];
        
        [self addSubview:_tvTime];
        [self addSubview:_tvNum];
        [self addSubview:space];
        
        [_tvTime mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(10);
            make.centerX.equalTo(self);
        }];
        
        [space mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self);
            make.left.right.equalTo(self);
            make.height.mas_equalTo(5);
        }];
        
        [_tvNum mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(space.mas_top).offset(-10);
            make.size.mas_equalTo(CGSizeMake(60, 34));
            make.centerX.equalTo(self);
        }];
    }
    return self;
}

@end
